home *** CD-ROM | disk | FTP | other *** search
/ Languguage OS 2 / Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO / gnu / tar-1_11.lha / tar-1.11.2 / Makefile.in < prev    next >
Makefile  |  1993-03-25  |  6KB  |  192 lines

  1. # Un*x Makefile for GNU tar program.
  2. # Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc.
  3.  
  4. # This program is free software; you can redistribute it and/or modify
  5. # it under the terms of the GNU General Public License as published by
  6. # the Free Software Foundation; either version 2, or (at your option)
  7. # any later version.
  8.  
  9. # This program is distributed in the hope that it will be useful,
  10. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  12. # GNU General Public License for more details.
  13.  
  14. # You should have received a copy of the GNU General Public License
  15. # along with this program; if not, write to the Free Software
  16. # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  17.  
  18. #### Start of system configuration section. ####
  19.  
  20. srcdir = @srcdir@
  21. VPATH = @srcdir@
  22.  
  23. # If you use gcc, you should either run the fixincludes script that
  24. # comes with it or else use gcc with the -traditional option.  Otherwise
  25. # ioctl calls will be compiled incorrectly on some systems.
  26. CC = @CC@
  27. YACC = @YACC@
  28. INSTALL = @INSTALL@
  29. INSTALL_PROGRAM = @INSTALL_PROGRAM@
  30. INSTALL_DATA = @INSTALL_DATA@
  31.  
  32. # Things you might add to DEFS:
  33. # -DSTDC_HEADERS    If you have ANSI C headers and libraries.
  34. # -DHAVE_UNISTD_H    If you have unistd.h.
  35. # -DHAVE_STRING_H    If you don't have ANSI C headers but have string.h.
  36. # -DHAVE_LIMITS_H    If you have limits.h.
  37. # -DBSD42        If you have sys/dir.h (unless you use -DPOSIX),
  38. #            sys/file.h, and st_blocks in `struct stat'.
  39. # -DDIRENT        If you have dirent.h.
  40. # -DSYSNDIR        Old Xenix systems (sys/ndir.h).
  41. # -DSYSDIR        Old BSD systems (sys/dir.h).
  42. # -DNDIR        Old System V systems (ndir.h).
  43. # -DMAJOR_IN_MKDEV    If major, minor, makedev defined in sys/mkdev.h.
  44. # -DMAJOR_IN_SYSMACROS    If major, minor, makedev defined in sys/sysmacros.h.
  45. # -DRETSIGTYPE=int    If your signal handlers return int, not void.
  46. # -DHAVE_SYS_MTIO_H    If you have sys/mtio.h (magtape ioctls).
  47. # -DHAVE_SYS_GENTAPE_H    If you have sys/gentape.h (ISC magtape ioctls).
  48. # -DHAVE_NETDB_H    To use rexec for remote tape operations
  49. #            instead of forking rsh or remsh.
  50. # -DNO_REMOTE        If you have neither a remote shell nor rexec.
  51. # -DHAVE_VPRINTF    If you have vprintf function.
  52. # -DHAVE_DOPRNT        If you have _doprnt function (but lack vprintf).
  53. # -DHAVE_FTIME        If you have ftime system call.
  54. # -DHAVE_STRSTR        If you have strstr function.
  55. # -DHAVE_VALLOC        If you have valloc function.
  56. # -DHAVE_MKDIR        If you have mkdir and rmdir system calls.
  57. # -DHAVE_MKNOD        If you have mknod system call.
  58. # -DHAVE_RENAME     If you have rename system call.
  59. # -DHAVE_GETCWD        If not POSIX.1 but have getcwd function.
  60. # -DHAVE_FTRUNCATE    If you have ftruncate system call.
  61. # -DV7            On Version 7 Unix (not tested in a long time).
  62. # -DEMUL_OPEN3        If you lack a 3-argument version of open, and want
  63. #            to emulate it with system calls you do have.
  64. # -DNO_OPEN3        If you lack the 3-argument open and want to
  65. #            disable the tar -k option instead of emulating open.
  66. # -DXENIX        If you have sys/inode.h and need it to be included.
  67.  
  68. DEF_AR_FILE = @DEF_AR_FILE@
  69. DEFBLOCKING = 20
  70. DEFS = @DEFS@ -DDEF_AR_FILE=\"$(DEF_AR_FILE)\" -DDEFBLOCKING=$(DEFBLOCKING)
  71.  
  72. # Set this to rtapelib.o unless you defined NO_REMOTE, in which case
  73. # make it empty.
  74. RTAPELIB = @RTAPELIB@
  75. LIBS = @LIBS@
  76.  
  77. CFLAGS = -g
  78. LDFLAGS = -g
  79.  
  80. prefix = /usr/local
  81. exec_prefix = $(prefix)
  82.  
  83. # Prefix for each installed program, normally empty or `g'.
  84. binprefix = 
  85.  
  86. # The directory to install tar in.
  87. bindir = $(exec_prefix)/bin
  88.  
  89. # Where to put the rmt executable.
  90. libdir = /etc
  91.  
  92. # The directory to install the info files in.
  93. infodir = $(prefix)/info
  94.  
  95. #### End of system configuration section. ####
  96.  
  97. SHELL = /bin/sh
  98.  
  99. SRC1 =    tar.c create.c extract.c buffer.c getoldopt.c update.c gnu.c mangle.c
  100. SRC2 =  version.c list.c names.c diffarch.c port.c fnmatch.c getopt.c malloc.c
  101. SRC3 =  getopt1.c regex.c getdate.y getdate.c alloca.c
  102. SRCS =    $(SRC1) $(SRC2) $(SRC3)
  103. OBJ1 =    tar.o create.o extract.o buffer.o getoldopt.o update.o gnu.o mangle.o
  104. OBJ2 =    version.o list.o names.o diffarch.o port.o fnmatch.o getopt.o @MALLOC@
  105. OBJ3 =  getopt1.o regex.o getdate.o $(RTAPELIB) @ALLOCA@
  106. OBJS =    $(OBJ1) $(OBJ2) $(OBJ3)
  107. AUX =   README INSTALL NEWS COPYING ChangeLog Makefile.in makefile.pc \
  108.     configure configure.in \
  109.     tar.h fnmatch.h pathmax.h port.h open3.h getopt.h regex.h \
  110.     rmt.h rmt.c rtapelib.c \
  111.     msd_dir.h msd_dir.c tcexparg.c \
  112.     level-0 level-1 backup-specs dump-remind testpad.c getpagesize.h
  113. #    tar.texinfo tar.info* texinfo.tex \
  114.  
  115. all:    @PROGS@ 
  116. # tar.info
  117.  
  118. .c.o:
  119.     $(CC) -c $(CFLAGS) $(CPPFLAGS) $(DEFS) -I$(srcdir) -I. $<
  120.  
  121. tar:    $(OBJS)
  122.     $(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
  123.  
  124. rmt:    rmt.c
  125.     $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(srcdir)/rmt.c $(LIBS)
  126.  
  127. tar.info: tar.texinfo
  128.     makeinfo $(srcdir)/tar.texinfo
  129.  
  130. install: all
  131.     $(INSTALL_PROGRAM) tar $(bindir)/$(binprefix)tar
  132.     -test ! -f rmt || $(INSTALL_PROGRAM) rmt $(libdir)/rmt
  133. #    for file in $(srcdir)/tar.info*; \
  134. #    do $(INSTALL_DATA) $$file $(infodir)/$$file; \
  135. #    done
  136.  
  137. uninstall:
  138.     rm -f $(bindir)/$(binprefix)tar    $(infodir)/tar.info*
  139.     -rm -f $(libdir)/rmt
  140.  
  141. $(OBJS): tar.h pathmax.h port.h testpad.h
  142. regex.o buffer.o tar.o: regex.h
  143. tar.o fnmatch.o: fnmatch.h
  144.  
  145. getdate.c: getdate.y
  146.     $(YACC) $(srcdir)/getdate.y
  147.     mv y.tab.c getdate.c
  148. # getdate.y has 8 shift/reduce conflicts.
  149.  
  150. testpad.h: testpad
  151.     ./testpad
  152.  
  153. testpad: testpad.o
  154.     $(CC) -o $@ testpad.o
  155.  
  156. TAGS:    $(SRCS)
  157.     etags $(SRCS)
  158.  
  159. clean:
  160.     rm -f *.o tar rmt testpad testpad.h core
  161.  
  162. mostlyclean: clean
  163.  
  164. distclean: clean
  165.     rm -f Makefile config.status
  166.  
  167. realclean: distclean
  168.     rm -f TAGS *.info* getdate.c y.tab.c
  169.  
  170. shar: $(SRCS) $(AUX)
  171.     shar $(SRCS) $(AUX) | gzip > tar-`sed -e '/version_string/!d' -e 's/[^0-9.]*\([0-9.]*\).*/\1/' -e q version.c`.shar.z
  172.  
  173. dist: $(SRCS) $(AUX)
  174.     echo tar-`sed -e '/version_string/!d' -e 's/[^0-9.]*\([0-9.]*\).*/\1/' -e q version.c` > .fname
  175.     -rm -rf `cat .fname`
  176.     mkdir `cat .fname`
  177.     for file in $(SRCS) $(AUX); do \
  178.           ln $$file `cat .fname` || cp $$file `cat .fname`; done
  179.     tar chzf `cat .fname`.tar.z `cat .fname`
  180.     -rm -rf `cat .fname` .fname
  181.  
  182. tar.zoo: $(SRCS) $(AUX)
  183.     -rm -rf tmp.dir
  184.     -mkdir tmp.dir
  185.     -rm tar.zoo
  186.     for X in $(SRCS) $(AUX) ; do echo $$X ; sed 's/$$//' $$X > tmp.dir/$$X ; done
  187.     cd tmp.dir ; zoo aM ../tar.zoo *
  188.     -rm -rf tmp.dir
  189.  
  190. # Prevent GNU make v3 from overflowing arg limit on SysV.
  191. .NOEXPORT:
  192.